﻿using QuanLySieuThi.Models;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QuanLySieuThi.Controllers
{
    public class QuanLyHoaDonChiTietNhap : BaseController<HoaDonChiTietNhap>
    {
        private static QuanLyHoaDonChiTietNhap _uniqueObject = null;
        public static QuanLyHoaDonChiTietNhap UniqueObject
        {
            get
            {
                if (_uniqueObject == null)
                    _uniqueObject = new QuanLyHoaDonChiTietNhap();
                return _uniqueObject;
            }
        }
        public QuanLyHoaDonChiTietNhap()
        {
        }

        public void XoaTheoMaMatHang(string maMatHang)
        {
            db.ExecuteNonQuery("delete HoaDonChiTietNhap where MaMatHang = '" + maMatHang + "'");
        }

        public void XoaTheoMaHoaDon(string maHoaDonNhap)
        {
            db.ExecuteNonQuery("delete HoaDonChiTietNhap where MaHoaDonNhap ='" + maHoaDonNhap + "'");
        }
    }
}
